<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/common/base.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<link rel="stylesheet" type="text/css" href="css/styles.css">
<link rel="stylesheet" type="text/css" href="css/admin.css">
<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="js/admin.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		//重新绑定表单提交
		$("#query_btn").bind("click", function() {
			$('form').submit();
		});
	});
	//选择不同的村组
	function chooseGroup(){
		var val=$("#village").val();
		$.ajax({
			   type: "POST",
			   url: "<%=path%>/system/AreaServlet?m=groupList",
			   data: {"villageID":val},
			   dataType:"json",
			   success: function(data){
				 $("#group").empty();
			     $.each(data,function(i,val){
			    	 $("#group").append("<option value='"+val.areacode+"'>"+val.areaname+"</option>");
			     });
			   }
			});
	}
	</script>
  </head>
  
  <body>
  	<form method="post" action="<%=path %>/system/PaymentServlet?m=choose" id="listform">
    <div class="panel admin-panel">
    <div class="panel-head">
				<strong class="icon-reorder">参合缴费登记</strong>
			</div>
			<div class="padding border-bottom">
				<ul class="search" style="padding-left:10px;">
				<li>所在村：</li>
				<li><select id="village" name="village" class="input" style="width:100px; line-height:17px;display:inline-block" 
							onchange="chooseGroup();">
							<c:forEach  items="${villages}" var="item">
							 <option value="${item.areacode}">${item.areaname}</option>
							</c:forEach>
						</select></li>
				    <li><label>所在组：</label>
				       </li>
				       <li><select id="group" name="group" class="input" style="width:100px; line-height:17px;display:inline-block"  >
								<option value="">请选择所在组</option>
							</select></li>
					<li><label>户主姓名：</label></li>
					<li><input type="text" placeholder="请输入搜索关键字" name="persname" data-validate="required:姓名不能为空" 
						class="input"
						style="width:150px; line-height:17px;display:inline-block" /> <a
						id="query_btn"
						href="javascript:void(0)" class="button border-main icon-search"
						> 查询</a></li>
				</ul>
			</div>
    </div>
    </form>
  </body>
</html>
